import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;

public class Test5 {
    public static void main(String[] args) {

        List<String> list = new ArrayList<>();

        list.add("Apple");
        list.add("Banana");
        list.add("Cherry");

        System.out.println("List elements:");
        for (String fruit : list) {
            System.out.println(fruit);
        }

        String searchItem = "Banana";
        if (list.contains(searchItem)) {
            System.out.println("Found " + searchItem + " in the list.");
        }

        list.remove("Cherry");
        System.out.println("List after removal:");
        for (String fruit : list) {
            System.out.println(fruit);
        }

        Set<String> set = new HashSet<>();

        set.add("Apple");
        set.add("Banana");
        set.add("Cherry");

        System.out.println("Set elements:");
        for (String fruit : set) {
            System.out.println(fruit);
        }

        if (set.contains(searchItem)) {
            System.out.println("Found " + searchItem + " in the set.");
        }

        set.remove("Cherry");
        System.out.println("Set after removal:");
        for (String fruit : set) {
            System.out.println(fruit);
        }

        Map<String, String> map = new HashMap<>();

        map.put("001", "Apple");
        map.put("002", "Banana");
        map.put("003", "Cherry");

        System.out.println("Map elements:");
        for (Map.Entry<String, String> entry : map.entrySet()) {
            System.out.println(entry.getKey() + " : " + entry.getValue());
        }

        if (map.containsKey("002")) {
            System.out.println("Found " + map.get("002") + " in the map with key 002.");
        }

        map.remove("003");
        System.out.println("Map after removal:");
        for (Map.Entry<String, String> entry : map.entrySet()) {
            System.out.println(entry.getKey() + " : " + entry.getValue());
        }
    }
}